<template>
  <div v-if="isShow" class="loading">Lading...</div>
</template>

<script setup lang="ts">
const isShow = ref(false);

const showLoading = () => {
  isShow.value = true;
};

const hideLoading = () => {
  isShow.value = false;
};

defineExpose({
  isShow,
  showLoading,
  hideLoading,
});
</script>

<style scoped>
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: black;
  opacity: 0.8;
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: white;
}
</style>
